﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data.Odbc;
using System.Data.OleDb;
using System.Configuration;

public partial class _Default : System.Web.UI.Page
{
    
    protected void Page_Load(object sender, EventArgs e)
    {

            GetSlotDetails mySlotDetail = new GetSlotDetails();

            int iSslot1booked = mySlotDetail.MgetSlotDetails(1);
            if (iSslot1booked == 0)
            {
                Button1.Style.Add("background-color", "green");
            }
            else
            {
                Button1.Style.Add("background-color", "red");
            }

            int iSslot2booked = mySlotDetail.MgetSlotDetails(2);
            if (iSslot2booked == 0)
            {
                Button2.Style.Add("background-color", "green");
            }
            else
            {
                Button2.Style.Add("background-color", "red");
            }

            int iSslot3booked = mySlotDetail.MgetSlotDetails(3);
            if (iSslot3booked == 0)
            {
                Button3.Style.Add("background-color", "green");
            }
            else
            {
                Button3.Style.Add("background-color", "red");
            }

            int iSslot4booked = mySlotDetail.MgetSlotDetails(4);
            if (iSslot4booked == 0)
            {
                Button4.Style.Add("background-color", "green");
            }
            else
            {
                Button4.Style.Add("background-color", "red");
            }

            int iSslot5booked = mySlotDetail.MgetSlotDetails(5);
            if (iSslot5booked == 0)
            {
                Button5.Style.Add("background-color", "green");
            }
            else
            {
                Button5.Style.Add("background-color", "red");
            }

            int iSslot6booked = mySlotDetail.MgetSlotDetails(6);
            if (iSslot6booked == 0)
            {
                Button6.Style.Add("background-color", "green");
            }
            else
            {
                Button6.Style.Add("background-color", "red");
            }

            int iSslot7booked = mySlotDetail.MgetSlotDetails(7);
            if (iSslot7booked == 0)
            {
                Button7.Style.Add("background-color", "green");
            }
            else
            {
                Button7.Style.Add("background-color", "red");
            }

            int iSslot8booked = mySlotDetail.MgetSlotDetails(8);
            if (iSslot8booked == 0)
            {
                Button8.Style.Add("background-color", "green");
            }
            else
            {
                Button8.Style.Add("background-color", "red");
            }

            int iSslot9booked = mySlotDetail.MgetSlotDetails(9);
            if (iSslot9booked == 0)
            {
                Button9.Style.Add("background-color", "green");
            }
            else
            {
                Button9.Style.Add("background-color", "red");
            }

            int iSslot10booked = mySlotDetail.MgetSlotDetails(10);
            if (iSslot10booked == 0)
            {
                Button10.Style.Add("background-color", "green");
            }
            else
            {
                Button10.Style.Add("background-color", "red");
            }

            int iSslot11booked = mySlotDetail.MgetSlotDetails(11);
            if (iSslot11booked == 0)
            {
                Button11.Style.Add("background-color", "green");
            }
            else
            {
                Button11.Style.Add("background-color", "red");
            }

            int iSslot12booked = mySlotDetail.MgetSlotDetails(12);
            if (iSslot12booked == 0)
            {
                Button12.Style.Add("background-color", "green");
            }
            else
            {
                Button12.Style.Add("background-color", "red");
            }

            int iSslot13booked = mySlotDetail.MgetSlotDetails(13);
            if (iSslot13booked == 0)
            {
                Button13.Style.Add("background-color", "green");
            }
            else
            {
                Button13.Style.Add("background-color", "red");
            }

            int iSslot14booked = mySlotDetail.MgetSlotDetails(14);
            if (iSslot14booked == 0)
            {
                Button14.Style.Add("background-color", "green");
            }
            else
            {
                Button14.Style.Add("background-color", "red");
            }

            int iSslot15booked = mySlotDetail.MgetSlotDetails(15);
            if (iSslot15booked == 0)
            {
                Button15.Style.Add("background-color", "green");
            }
            else
            {
                Button15.Style.Add("background-color", "red");
            }

            int iSslot16booked = mySlotDetail.MgetSlotDetails(16);
            if (iSslot16booked == 0)
            {
                Button16.Style.Add("background-color", "green");
            }
            else
            {
                Button16.Style.Add("background-color", "red");
            }

            int iSslot17booked = mySlotDetail.MgetSlotDetails(17);
            if (iSslot17booked == 0)
            {
                Button17.Style.Add("background-color", "green");
            }
            else
            {
                Button17.Style.Add("background-color", "red");
            }

            int iSslot18booked = mySlotDetail.MgetSlotDetails(18);
            if (iSslot18booked == 0)
            {
                Button18.Style.Add("background-color", "green");
            }
            else
            {
                Button18.Style.Add("background-color", "red");
            }

            int iSslot19booked = mySlotDetail.MgetSlotDetails(19);
            if (iSslot19booked == 0)
            {
                Button19.Style.Add("background-color", "green");
            }
            else
            {
                Button19.Style.Add("background-color", "red");
            }

            int iSslot20booked = mySlotDetail.MgetSlotDetails(20);
            if (iSslot20booked == 0)
            {
                Button20.Style.Add("background-color", "green");
            }
            else
            {
                Button20.Style.Add("background-color", "red");
            }

            int iSslot21booked = mySlotDetail.MgetSlotDetails(21);
            if (iSslot21booked == 0)
            {
                Button21.Style.Add("background-color", "green");
            }
            else
            {
                Button21.Style.Add("background-color", "red");
            }

            int iSslot22booked = mySlotDetail.MgetSlotDetails(22);
            if (iSslot22booked == 0)
            {
                Button22.Style.Add("background-color", "green");
            }
            else
            {
                Button22.Style.Add("background-color", "red");
            }

            int iSslot23booked = mySlotDetail.MgetSlotDetails(23);
            if (iSslot23booked == 0)
            {
                Button23.Style.Add("background-color", "green");
            }
            else
            {
                Button23.Style.Add("background-color", "red");
            }

            int iSslot24booked = mySlotDetail.MgetSlotDetails(24);
            if (iSslot24booked == 0)
            {
                Button24.Style.Add("background-color", "green");
            }
            else
            {
                Button24.Style.Add("background-color", "red");
            }

            int iSslot25booked = mySlotDetail.MgetSlotDetails(25);
            if (iSslot25booked == 0)
            {
                Button25.Style.Add("background-color", "green");
            }
            else
            {
                Button25.Style.Add("background-color", "red");
            }

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslotbooked = mySlotDetail.MgetSlotDetails(1);
        if (iSslotbooked == 0) {
            Response.Redirect("Specificbooking.aspx?soltnumber=01");
        }else
        {
            //red bottons will not direct to anypage
        }
        
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(2);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=02");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(3);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=03");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button4_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(4);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=04");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button5_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(5);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=05");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button6_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(6);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=06");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button7_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(7);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=07");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button8_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(8);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=08");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button9_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(9);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=09");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button10_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(10);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=10");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button11_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(11);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=11");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button12_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(12);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=12");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button13_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(13);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=13");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button14_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(14);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=14");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button15_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(15);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=15");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }

    protected void Button16_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(16);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=16");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button17_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(17);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=17");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button18_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(18);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=18");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button19_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(19);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=19");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button20_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(20);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=20");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button21_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(21);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=21");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button22_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(22);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=22");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button23_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(23);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=23");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button24_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(24);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=24");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }
    protected void Button25_Click(object sender, EventArgs e)
    {
        GetSlotDetails mySlotDetail = new GetSlotDetails();
        int iSslot1booked = mySlotDetail.MgetSlotDetails(25);
        if (iSslot1booked == 0)
        {
            Response.Redirect("Specificbooking.aspx?soltnumber=25");
        }
        else
        {
            //red bottons will not direct to anypage
        }
    }




}